package com.example.coursehub.repository;

import com.example.coursehub.entity.StudentMaterial;
import com.example.coursehub.entity.StudentMaterialId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Collection;
import java.util.List;

public interface StudentMaterialRepository extends JpaRepository<StudentMaterial, StudentMaterialId>, JpaSpecificationExecutor<StudentMaterial> {

    List<StudentMaterial> findByUser_UserIdAndMaterial_Chapter_ChapterIdAndIsFinished(String userId, String chapterId, boolean b);

}